Mutable Lists and Call-by-reference in Equational Logic
نویسندگان
چکیده
As the interest for formal methods grows within industry, the need for convenient and automated tools grows too. SOSSubC is an attempt to help the development of certified programs. It allows formal reasoning about imperative programs by translating programs written in SubC, a simple imperative language, into equations. Programs are then axioms of a logical system within which proofs can be carried out. In this paper, we add to the SubC language two important imperative features: mutable lists and call-byreference passing mode. We present their implementation and semantics in SubC, as well as their translation into conditional equations by the SOSSubC system.
منابع مشابه
Mutable Lists and Call-by-Reference with SOSSubC
SubC is a study imperative language around which we build the SOSSubC system as an attempt to help the development of certified programs. It allows formal reasoning about imperative programs by translating programs into equations, with which proofs can be carried out. In this paper, we add to the SubC language two important imperative features: mutable lists and call-by-reference passing mode. ...
متن کاملRewriting Haskell Strings
The Haskell String type is notoriously inefficient. We introduce a new data type, ByteString, based on lazy lists of byte arrays, combining the speed benefits of strict arrays with lazy evaluation. Equational transformations based on term rewriting are used to deforest intermediate ByteStrings automatically. We describe novel fusion combinators with improved expressiveness and performance over ...
متن کاملDeriving a Hoare-Floyd logic for non-local jumps from a formulae-as-types notion of control
We derive a Hoare-Floyd logic for non-local jumps and mutable higher-order procedural variables from a formulæ-as-types notion of control for classical logic. The main contribution of this work is the design of an imperative dependent type system for non-local jumps which corresponds to classical logic but where the famous consequence rule is still derivable. Hoare-Floyd logics for non-local ju...
متن کاملCall Invariants
Program verifiers based on first-order theorem provers model the program heap as a collection of mutable maps. In such verifiers, preserving unmodified facts about the heap across procedure calls is difficult because of scoping and modification of possibly unbounded set of heap locations. Existing approaches to deal with this problem are either too imprecise, require introducing untrusted assum...
متن کاملA Tutorial on Specifying Data Structures in Maude
This tutorial describes the equational specification of a series of typical data structures in Maude. We start with the well-known stacks, queues, and lists, to continue with binary and search trees. Not only are the simple versions considered but also advanced ones such as AVL and 2-3-4 trees. The operator attributes available in Maude allow the specification of data based on constructors that...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2007